/*

package com.huizu.web.controller.monitor;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.huizu.common.config.CasProperties;
import com.huizu.common.core.controller.BaseController;
import com.huizu.common.core.domain.AjaxResult;
import org.jasig.cas.client.authentication.AttributePrincipal;
import org.jasig.cas.client.validation.Assertion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

import static org.jasig.cas.client.util.AbstractCasFilter.CONST_CAS_ASSERTION;

@RestController
@RequestMapping("/cas")
public class SysCASController extends BaseController {
    @Autowired
    private CasProperties casProperties;


    */
/**
     * 适用前后端分离
     * 当未登录时重定向到此请求，返回给前端CAS服务器登录地址，通过前端跳转
     *
     * @return
     *//*


    @GetMapping("/send")
    public AjaxResult send() {
        String url = casProperties.getCasServerLoginUrl() + "?service=" + casProperties.getAppServerUrl() + casProperties.getAppLoginUrl();
        return AjaxResult.error(600, url);
    }


*/
/**
     * 适用前后端分离
     * 当登录成功后返回前端数据
     *
     * @return
     *//*


    @GetMapping("/login")
    public AjaxResult login(HttpServletResponse response) throws IOException {
        response.sendRedirect(casProperties.getAppServerHomeUrl());
        return AjaxResult.success("成功");
    }
}


*/
